package coms.itboyes.bycommon.commonwidget;

import android.os.CountDownTimer;
import android.widget.TextView;

/**
 * 倒计时可点击
 */
public class TimeCount extends CountDownTimer{
	
	
	private TextView tv;

	public TimeCount(long millisInFuture, long countDownInterval, TextView tv) {
		super(millisInFuture, countDownInterval);
		this.tv=tv;
	}



	@Override
	public void onFinish() {
		tv.setText("重新验证");
		tv.setClickable(true);
	}

	@Override
	public void onTick(long millisUntilFinished) {
		tv.setClickable(false);
		tv.setText(millisUntilFinished / 1000 + "秒后重新发送");
		
	}

}
